<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>节点详细信息</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="Modern Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript">
	
	 addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } 

</script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<!-- Nav CSS -->
<script type="text/javascript">
function fun(id, name) {
	var span_selected = window.opener.document.getElementById("span_selected");
	span_selected.innerHTML = name;	
	var input_client = window.opener.document.getElementById("input_client");
	input_client.value = id;
	window.close();
}

function search() {
	var search_text = document.getElementById("search_text");
	var re = new RegExp(search_text.value);
	var all_client = document.getElementsByClassName("all_client");
	for (i=0;i<all_client.length;i++) {
		// 遍历得到所有a标签，即合同甲方
		if(!re.test(all_client.item(i).value)) {
			all_client.item(i).style.display = "none";
		} else {
			all_client.item(i).style.display = "inline";
		}
	}
}

</script>
</head>
<body>
	<div id="wrapper">
		<!-- Navigation -->
		<div id="page-wrapper">

			<div class="xs">
				<div class="well1 white">
					<h3 align="center">
						合同甲方列表
					</h3>
						输入首字母搜索：<input type="text" id="search_text" onkeyup="search()"/> <hr/>
						<c:forEach items="${clientList }" var="c">
							<%-- <a href="#" onclick="fun('${c.id}', '${c.name }')" class="all_client">${c.name }</a> --%>
							<button value="${c.abbr }" class="all_client" onclick="fun('${c.id}', '${c.name }')">${c.name }</button>
						</c:forEach>
						<hr/>
						<div class="form-group" align="center">
							<button class="btn btn-primary" onclick="window.close()">关闭</button>
						</div>
				</div>
			</div>
		</div>
		<!-- /#page-wrapper -->
	</div>
	<!-- /#wrapper -->
</body>
</html>
